import request from '@/utils/request'

// 查询生成表数据
export function findDefense(data) {
  console.log(data)
  return request({
    url: '/base-distribution/findefense',
    method: 'post',
    data
  })
}

export function findface(data) {
  return request({
    url: '/es/api/face/all',
    method: 'post',
    data
  })
}

export function adddefense(data) {
  return request({
    url: '/base-distribution/add',
    method: 'post',
    data
  })
}

export function findcount() {
  return request({
    url: '/base-sixreal/population/findcount',
    method: 'post',
  })
}

export function findlastTime(data) {
  return request({
    url: '/base-sixreal/population/findlasttime',
    method: 'post',
    data
  })
}

export function upddefence(data) {
  return request({
    url: '/base-distribution/update',
    method: 'post',
    data
  })
}

export function updstatu(id) {
  return request({
    url: `/base-distribution/updstatu/${id}`, // 注意这里的变化
    method: 'get',
  })
}

/**
 * 布放车辆列表
 * */
export function carlist(data) {
  console.log(data)
  return request({
    url: '/base-distribution/vehicledeployment/carlist',
    method: 'post',
    data
  })
}
/**
 * 布放车辆列表
 * */
export function batchOpen(data) {

  return request({
    url: '/base-distribution/batchOpen',
    method: 'post',
    data
  })
}
